<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class SubMessage extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'eb_sub_message';
    public $timestamps = false;
    public static $typeText = [
        '1' => '社区通知',
        '2' => '体检预约提醒',
        '3' => '宣教指导通知',
        '4' => '追访提醒',
        '5' => '就诊提醒'
    ];
    public static function install($user_id,$type,$url,$content)
    {
        $model = new SubMessage();
        $model->user_id = $user_id;
        $model->type  = $type;
        $model->content = $content;
        $model->url = $url;
        $model->save();
    }
}
